﻿using System;

class OddNumber
{
    static void Main()
    {
        //C# Fundamentals 2011/2012 Part 1 - Test Exam
        //BGCoder score:  50 / 100 - избиват тестовете с много големи числа - time limit

        uint N = uint.Parse(Console.ReadLine());
        long[] number = new long[N];
        for (int i = 0; i < N; i++)
        {
            number[i] = long.Parse(Console.ReadLine());
        }       
        
        long searchNumber = 0;
        for (int i = 0; i < N; i++)
        {
            int count = 0;
            for (int j = 0; j < N; j++)
            {
                if (number[i] == number[j])
                {
                    count++;                    
                }                            
            }            
                
            if (count % 2 != 0)
            {
                searchNumber = number[i];
            }                
        }        
        Console.WriteLine(searchNumber);
    }
}

